<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/12
 * Time: 14:35
 */

namespace app\controllers;

use app\models\ItemModel;
use fastphp\base\Controller;
class SiteController extends Controller
{
    public function index()
    {
        $itemModel = new ItemModel();
        $itemModel->where(['id'=>':id']);
        //update
//        $itemModel->setParam([':id'=>1,':name'=>'admin']);
//        var_dump($itemModel->update(['name'=>':name']));

        $item = $itemModel->fetch();
        $this->assign('item',$item);
        $this->render();
    }
}